gdk: Don't create surfaces of size 0x0
authorMatthias Clasen <mclasen@redhat.com>
Thu, 10 Sep 2020 17:56:44 +0000 (13:56 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 10 Sep 2020 17:56:44 +0000 (13:56 -0400)
Don't pass 0x0 as size when calling gdk_surface_new().
The Wayland backend takes us literally, and we end
up with a surface that (temporarily) has these
dimensions, confusing other APIs that we pass the
size to, such as Vulkan.

gdk/gdksurface.c

index 3a03292251c3f0ecb2fadf422b5714821f6a3ee4..3624aadeca32b90fa0074ece1f035f334e9d28af 100644 (file)
@@ -813,7 +813,7 @@ gdk_surface_new_toplevel (GdkDisplay *display)
   g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
 
   return gdk_surface_new (display, GDK_SURFACE_TOPLEVEL,
-                          NULL, 0, 0, 0, 0);
+                          NULL, 0, 0, 1, 1);
 }
 
 /**